JMLC = jmlc -O -Q
RM = rm
JAVA = java
JAVAC = javac
JUNIT = /usr/share/java/junit4.jar
JMLRUNTIME = /usr/JML/bin/jmlruntime.jar
JMLCLASSPATH = $(JMLRUNTIME)
JMLJUNITCLASSPATH = $(JMLCLASSPATH):$(JUNIT):.

START_JUNIT = junit.swingui.TestRunner
START_JUNIT = org.junit.runner.JUnitCore paircovTest

OTHER_IMPLEM_PATH = ../../../otherPairCovImplem

genTest : genTest.class
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/correct1.jar:$(JMLCLASSPATH):. genTest


runMyImplem: 
	$(JMLC) paircov.java
	$(JAVAC) controleMain1.java 
	$(JAVA) -cp $(JMLCLASSPATH):. controleMain1

runcor1 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/correct1.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/correct1.jar:$(JMLCLASSPATH):. controleMain1
	
runcor2 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/correct2.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/correct2.jar:$(JMLCLASSPATH) controleMain1

runpcor1 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/presquecorrect1.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/presquecorrect1.jar:$(JMLCLASSPATH) controleMain1

runpcor2 :
	$(JAVAC) -cp presque${OTHER_IMPLEM_PATH}/correct2.jar controleMain1.java 
	$(JAVA) -cp presque${OTHER_IMPLEM_PATH}/correct2.jar:$(JMLCLASSPATH) controleMain1

runerr1 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur1.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur1.jar:$(JMLCLASSPATH) controleMain1

runerr2 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur2.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur2.jar:$(JMLCLASSPATH) controleMain1

runerr3 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur3.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur3.jar:$(JMLCLASSPATH) controleMain1

runerr4 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur4.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur4.jar:$(JMLCLASSPATH) controleMain1

runerr5 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur5.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur5.jar:$(JMLCLASSPATH) controleMain1

runerr6 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur6.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur6.jar:$(JMLCLASSPATH) controleMain1

runerr7 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur7.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur7.jar:$(JMLCLASSPATH) controleMain1

runerr8 :
	$(JAVAC) -cp ${OTHER_IMPLEM_PATH}/erreur8.jar controleMain1.java 
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur8.jar:$(JMLCLASSPATH) controleMain1




runPairCov : paircovInterf.class controleMain1.class
	$(JAVA) -cp $(JMLCLASSPATH) controleMain1


junitMyImplem: paircov.java edu/uclm/combTest/core/OrderedVector.java  edu/uclm/combTest/core/Element.java edu/uclm/combTest/core/Set.java edu/uclm/combTest/core/pairwise/Pair.java edu/uclm/combTest/core/pairwise/PairsTable.java   edu/uclm/combTest/core/Algorithm.java  edu/uclm/combTest/core/aetg/AETGAlgorithm.java edu/uclm/combTest/core/Combination.java 
	$(JMLC) paircov.java edu/uclm/combTest/core/OrderedVector.java  edu/uclm/combTest/core/Element.java edu/uclm/combTest/core/Set.java edu/uclm/combTest/core/pairwise/Pair.java edu/uclm/combTest/core/pairwise/PairsTable.java   edu/uclm/combTest/core/Algorithm.java  edu/uclm/combTest/core/aetg/AETGAlgorithm.java edu/uclm/combTest/core/Combination.java 
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):.  paircovTest.java
	$(JAVA) -cp .:$(JMLJUNITCLASSPATH) ${START_JUNIT}


junitcor1 : paircovInterf.class
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/correct1.jar:.  paircovTest.java
	$(JAVA) -cp .:${OTHER_IMPLEM_PATH}/correct1.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

junitcor2 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/correct2.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/correct2.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

junitpcor1 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):presque${OTHER_IMPLEM_PATH}/correct1.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/presquecorrect1.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

junitpcor2 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):presque${OTHER_IMPLEM_PATH}/correct2.jar:.  paircovTest.java
	$(JAVA) -Xms32m -Xmx512m -cp ${OTHER_IMPLEM_PATH}/presquecorrect2.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr1 : 
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur1.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur1.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr2 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur2.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur2.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr3 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur3.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur3.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr4 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur4.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur4.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr5 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur5.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur5.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr6 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur6.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur6.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr7 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur7.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur7.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}

juniterr8 :
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/erreur8.jar:.  paircovTest.java
	$(JAVA) -cp ${OTHER_IMPLEM_PATH}/erreur8.jar:$(JMLJUNITCLASSPATH) ${START_JUNIT}
	
junitPairCov : paircovTest.class paircovInterf.class paircov.class
	$(JAVA) -cp $(JMLJUNITCLASSPATH) ${START_JUNIT}
	


rmpaircov.class :
	rm paircov.class

paircovInterf.class : paircovInterf.java Test_Case.java
	$(JMLC) Test_Case.java
	$(JMLC) paircovInterf.java
	
paircov.class : paircovInterf.class
	$(JMLC) paircov.java
	
controleMain1.class : paircovInterf.class controleMain1.java
	$(JAVAC)  controleMain1.java 

genTest.class : paircovInterf.class genTest.java
	$(JAVAC) -classpath .:${OTHER_IMPLEM_PATH}/correct1.jar genTest.java
	
paircovTest.class : paircovTest.java
	$(JAVAC) -classpath $(JMLJUNITCLASSPATH):${OTHER_IMPLEM_PATH}/correct1.jar:.  paircovTest.java

clean : 
	$(RM) *.class

%.class: %.java
	$(JMLC) $<

